
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>Scrapy · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="flume采集本地文件到hdfs.html" />
    
    
    <link rel="prev" href="requests+pymysql.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    前言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" >
            
                <span>
            
                    
                    平台搭建
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../build/jdkmysql.html">
            
                <a href="../build/jdkmysql.html">
            
                    
                    jdk、mysql安装、环境变量配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../build/1.hadoop伪分布式部署.html">
            
                <a href="../build/1.hadoop伪分布式部署.html">
            
                    
                    HADOOP伪分布式搭建
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="../build/2.hadoop全分布式部署.html">
            
                <a href="../build/2.hadoop全分布式部署.html">
            
                    
                    HADOOP完全分布式搭建
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="../build/hadoopha.html">
            
                <a href="../build/hadoopha.html">
            
                    
                    hadoopHa介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.5" data-path="../build/3.hadoopha部署.html">
            
                <a href="../build/3.hadoopha部署.html">
            
                    
                    HADOOPHA搭建
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.6" data-path="../build/4.hive组件部署.html">
            
                <a href="../build/4.hive组件部署.html">
            
                    
                    HIVE搭建
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.7" data-path="../build/5.sqoop组件部署.html">
            
                <a href="../build/5.sqoop组件部署.html">
            
                    
                    SQOOP搭建
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.8" data-path="../build/6.hbase组件部署.html">
            
                <a href="../build/6.hbase组件部署.html">
            
                    
                    HBASE搭建
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.9" data-path="../build/7.flume组件部署.html">
            
                <a href="../build/7.flume组件部署.html">
            
                    
                    FLUME搭建
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.10" data-path="../build/8.spark组件部署.html">
            
                <a href="../build/8.spark组件部署.html">
            
                    
                    SPARK搭建
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.11" data-path="../build/9.kafka组件部署.html">
            
                <a href="../build/9.kafka组件部署.html">
            
                    
                    KAFKA搭建
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.12" data-path="../build/10.storm组件部署.html">
            
                <a href="../build/10.storm组件部署.html">
            
                    
                    STORM搭建
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.13" data-path="../build/11.zookeeper组件部署.html">
            
                <a href="../build/11.zookeeper组件部署.html">
            
                    
                    ZOOKEEPER搭建
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" >
            
                <span>
            
                    
                    数据采集
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="requests+pymysql.html">
            
                <a href="requests+pymysql.html">
            
                    
                    requsts+pymysql
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.3.2" data-path="scrapy.html">
            
                <a href="scrapy.html">
            
                    
                    Scrapy
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="flume采集本地文件到hdfs.html">
            
                <a href="flume采集本地文件到hdfs.html">
            
                    
                    Flume
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="jsoup.html">
            
                <a href="jsoup.html">
            
                    
                    Jsoup
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="http://wpa.qq.com/msgrd?v=3&uin=903563099&site=qq&menu=yes" target="blank" class="gitbook-link">
            联系我吧
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >Scrapy</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="scrapy&#xFF1A;">Scrapy&#xFF1A;</h1>
<p>Scrapy&#x662F;&#x4E00;&#x4E2A;&#x4E3A;&#x4E86;&#x722C;&#x53D6;&#x7F51;&#x7AD9;&#x6570;&#x636E;&#xFF0C;&#x63D0;&#x53D6;&#x7ED3;&#x6784;&#x6027;&#x6570;&#x636E;&#x800C;&#x7F16;&#x5199;&#x7684;&#x5E94;&#x7528;&#x6846;&#x67B6;&#x3002; &#x53EF;&#x4EE5;&#x5E94;&#x7528;&#x5728;&#x5305;&#x62EC;&#x6570;&#x636E;&#x6316;&#x6398;&#xFF0C;&#x4FE1;&#x606F;&#x5904;&#x7406;&#x6216;&#x5B58;&#x50A8;&#x5386;&#x53F2;&#x6570;&#x636E;&#x7B49;&#x4E00;&#x7CFB;&#x5217;&#x7684;&#x7A0B;&#x5E8F;&#x4E2D;&#x3002;</p>
<p>&#x5176;&#x6700;&#x521D;&#x662F;&#x4E3A;&#x4E86; &#x9875;&#x9762;&#x6293;&#x53D6; (&#x66F4;&#x786E;&#x5207;&#x6765;&#x8BF4;, &#x7F51;&#x7EDC;&#x6293;&#x53D6; )&#x6240;&#x8BBE;&#x8BA1;&#x7684;&#xFF0C; &#x4E5F;&#x53EF;&#x4EE5;&#x5E94;&#x7528;&#x5728;&#x83B7;&#x53D6;API&#x6240;&#x8FD4;&#x56DE;&#x7684;&#x6570;&#x636E;(&#x4F8B;&#x5982; Amazon Associates Web Services ) &#x6216;&#x8005;&#x901A;&#x7528;&#x7684;&#x7F51;&#x7EDC;&#x722C;&#x866B;&#x3002;</p>
<h2 id="&#x521B;&#x5EFA;&#x4E00;&#x4E2A;&#x65B0;&#x7684;scrapy&#x9879;&#x76EE;">&#x521B;&#x5EFA;&#x4E00;&#x4E2A;&#x65B0;&#x7684;<code>Scrapy</code>&#x9879;&#x76EE;</h2>
<pre><code>scrapy startproject boss
</code></pre><h2 id="&#x8FDB;&#x5165;&#x9879;&#x76EE;&#x76EE;&#x5F55;&#x521B;&#x5EFA;&#x722C;&#x866B;">&#x8FDB;&#x5165;&#x9879;&#x76EE;&#x76EE;&#x5F55;,&#x521B;&#x5EFA;&#x722C;&#x866B;</h2>
<pre><code>cd boss
scrapy genspider job www.zhipin.com
</code></pre><h2 id="&#x914D;&#x7F6E;&#x6587;&#x4EF6;">&#x914D;&#x7F6E;&#x6587;&#x4EF6;</h2>
<pre><code>scrapy.cfg: &#x9879;&#x76EE;&#x7684;&#x914D;&#x7F6E;&#x6587;&#x4EF6;
boss/: &#x8BE5;&#x9879;&#x76EE;&#x7684;python&#x6A21;&#x5757;&#x3002;&#x4E4B;&#x540E;&#x60A8;&#x5C06;&#x5728;&#x6B64;&#x52A0;&#x5165;&#x4EE3;&#x7801;&#x3002;
boss/items.py: &#x9879;&#x76EE;&#x4E2D;&#x7684;item&#x6587;&#x4EF6;&#xFF0C;Item &#x662F;&#x4FDD;&#x5B58;&#x722C;&#x53D6;&#x5230;&#x7684;&#x6570;&#x636E;&#x7684;&#x5BB9;&#x5668;.
boss/pipelines.py: &#x9879;&#x76EE;&#x4E2D;&#x7684;pipelines&#x6587;&#x4EF6; &#x6307;&#x5B9A;&#x5B58;&#x50A8;&#x5730;&#x5740;.
boss/settings.py: &#x9879;&#x76EE;&#x7684;&#x8BBE;&#x7F6E;&#x6587;&#x4EF6;.
boss/spiders/: &#x653E;&#x7F6E;spider&#x4EE3;&#x7801;&#x7684;&#x76EE;&#x5F55;.
</code></pre><h2 id="&#x4F8B;&#x5B50;">&#x4F8B;&#x5B50;</h2>
<p><a href="https://gitee.com/9035/scrapyQjwy" target="_blank">&#x524D;&#x7A0B;&#x65E0;&#x5FE7;Scrapy&#x722C;&#x866B;</a><br><a href="https://gitee.com/9035/ScrapyBoos" target="_blank">boss&#x76F4;&#x8058;Scrapy&#x722C;&#x866B;</a></p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="requests+pymysql.html" class="navigation navigation-prev " aria-label="Previous page: requsts+pymysql">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="flume采集本地文件到hdfs.html" class="navigation navigation-next " aria-label="Next page: Flume">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"Scrapy","level":"1.3.2","depth":2,"next":{"title":"Flume","level":"1.3.3","depth":2,"path":"spider/flume采集本地文件到hdfs.md","ref":"spider/flume采集本地文件到hdfs.md","articles":[]},"previous":{"title":"requsts+pymysql","level":"1.3.1","depth":2,"path":"spider/requests+pymysql.md","ref":"spider/requests+pymysql.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["livereload"],"pluginsConfig":{"livereload":{},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"spider/scrapy.md","mtime":"2019-12-06T02:06:30.480Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-12-06T01:48:49.248Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

